<?php
namespace app\common\controller;
use think\Model;
use think\facade\Db;
use think\facade\Request;
use think\facade\Session;
use think\facade\View;
use think\facade\Cookie;

class HomeBase extends Base
{
    protected function initialize()
    {
        parent::initialize();
        if ($this->request->isGet()) {
            View::assign('empty', '<div class="weui-loadmore"><span class="weui-loadmore__tips">~~暂无数据</span></div>');
        }
        $config = Db::table('system')->where(['pid'=>1,'status'=>1])->order('sort','ASC')->column('value','code');
        View::assign('config',$config);//网站配置
        !$config['is_closed'] && die('<!DOCTYPE html><html lang="zh" ><head><meta charset="UTF-8"><title>'.$config["close_comment"].'</title><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="/static/css/close.css"></head><body><div class="container"><h3 class="head">'.$config["close_comment"].'</h3><div class="component PC"><div class="flare"></div></div><div class="component signals"><div class="dot first"></div><div class="dot second"></div><div class="dot third"></div></div><div class="component server"><div class="slot"></div><div class="slot"></div><div class="button"></div><div class="button"></div></div></div></body></html>');
    }
}
